package com.jh.fcsm.beans.sys;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 用户角色关联
 *
 * @author szx
 * @date 2019-12-27 13:33:46
 */
@Table(name = "SYS_USER_ROLE")
@ApiModel(value = "com.jh.fcsm.beans.sys.SysUserRole", description = "用户角色关联")
public class SysUserRole {

    private static final long serialVersionUID = 1L;

    @Column(name = "ROLE_ID")
    @ColumnType(jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "角色标识")
    private String roleId;

    @Column(name = "USER_ID")
    @ColumnType(jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "用户标识")
    private String userId;

    /**
     * GET 角色标识
     *
     * @return roleId
     */
    public String getRoleId() {
        return roleId;
    }

    /**
     * SET 角色标识
     *
     * @param roleId
     */
    public void setRoleId(String roleId) {
        this.roleId = roleId == null ? null : roleId.trim();
    }

    /**
     * GET 用户标识
     *
     * @return userId
     */
    public String getUserId() {
        return userId;
    }

    /**
     * SET 用户标识
     *
     * @param userId
     */
    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}